package com.supermap.dubbo.api.grid.entity;

import java.io.*;
import java.util.Date;

/**
 * @Author:zhoujian
 * @Desciption:
 * @date:2019-07-15 17:22
 * @version:v1.0.0
 */
public class GridProductDo implements Serializable, Cloneable {
    private Integer id;
    //制作单位
    private String organization;
    //制作系统
    private String fromSystem;
    //日期
    private Date productDate;
    //产品内容【作物长势模拟、农业气象灾害监测、农用天气预报..】
    private String dataContent;
    //要素
    private String elementCode;
    //层次【地面L88】
    private String levelCode;
    //时效码【没有就是0】
    private Integer validCode;
    //时效间隔码
    private Integer intervalCode;
    //产品分辨率
    private String productResolution;
    //产品类型【格点/站点】
    private String productType;
    //区域码
    private String areaCode;
    //图片路径
    private String pngUrl;
    //json路径
    private String jsonUrl;
    //netcdf文件路径
    private String ncUrl;
    //
    private Date createTime;
    public Integer getId()
    {
        return id;
    }
    public void setId(Integer id)
    {
        this.id = id;
    }
    public String getOrganization()
    {
        return organization;
    }
    public void setOrganization(String organization)
    {
        this.organization = organization;
    }
    public String getFromSystem()
    {
        return fromSystem;
    }
    public void setFromSystem(String fromSystem)
    {
        this.fromSystem = fromSystem;
    }
    public Date getProductDate()
    {
        return productDate;
    }
    public void setProductDate(Date productDate)
    {
        this.productDate = productDate;
    }
    public String getDataContent()
    {
        return dataContent;
    }
    public void setDataContent(String dataContent)
    {
        this.dataContent = dataContent;
    }
    public String getElementCode()
    {
        return elementCode;
    }
    public void setElementCode(String elementCode)
    {
        this.elementCode = elementCode;
    }
    public String getLevelCode()
    {
        return levelCode;
    }
    public void setLevelCode(String levelCode)
    {
        this.levelCode = levelCode;
    }
    public Integer getValidCode()
    {
        return validCode;
    }
    public void setValidCode(Integer validCode)
    {
        this.validCode = validCode;
    }
    public Integer getIntervalCode()
    {
        return intervalCode;
    }
    public void setIntervalCode(Integer intervalCode)
    {
        this.intervalCode = intervalCode;
    }
    public String getProductResolution()
    {
        return productResolution;
    }
    public void setProductResolution(String productResolution)
    {
        this.productResolution = productResolution;
    }
    public String getProductType()
    {
        return productType;
    }
    public void setProductType(String productType)
    {
        this.productType = productType;
    }

    public String getAreaCode()
    {
        return areaCode;
    }
    public void setAreaCode(String areaCode)
    {
        this.areaCode = areaCode;
    }
    public String getPngUrl()
    {
        return pngUrl;
    }
    public void setPngUrl(String pngUrl)
    {
        this.pngUrl = pngUrl;
    }
    public String getJsonUrl()
    {
        return jsonUrl;
    }
    public void setJsonUrl(String jsonUrl)
    {
        this.jsonUrl = jsonUrl;
    }
    public String getNcUrl()
    {
        return ncUrl;
    }
    public void setNcUrl(String ncUrl)
    {
        this.ncUrl = ncUrl;
    }
    public Date getCreateTime()
    {
        return createTime;
    }
    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }

    public GridProductDo deepClone() throws IOException,ClassNotFoundException{
        //将对象写入流中
        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
        objectOutputStream.writeObject(this);
        //从流中取出
        ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
        ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
        return (GridProductDo)objectInputStream.readObject();

    }

}